#ifndef __TMC2209_H
#define __TMC2209_H

#include "stm32f10x_conf.h"

#define TMC2209UartTxOff() USART2->CR1&=~(USART_Mode_Tx);USART2->DR
#define TMC2209UartTxOn() USART2->CR1|=(USART_Mode_Tx)


void TMC2209_WriteData(uint8_t reg_addr,uint8_t* datagram);
ErrorStatus TMC2209_ReadData(uint8_t reg_addr,uint8_t* receive_data);
uint8_t TMC2209_calculate_crc(uint8_t* datagram,uint8_t datagramLength);


#endif // !__TMC2209_H

